package com.kilomob.grady.codec;

import io.netty.buffer.ByteBuf;

import java.io.IOException;

/**
 * 
 * 编解码接口类
 *   
 * @author zhouzhixiang  
 * @date 2017年1月1日
 * @since 1.0
 */
public interface MessageCodec {
    final public static int MESSAGE_LENGTH = 4;

    public void encode(final ByteBuf out, final Object message) throws IOException;

    public Object decode(byte[] body) throws IOException;
}
